Skip to content

next: webpack-dev-serve 6#5674

Open
bjohansebas wants to merge 25 commits into
mainfrom
next
Open

next: webpack-dev-serve 6#5674
bjohansebas wants to merge 25 commits into
mainfrom
next

Conversation

@bjohansebas
Copy link
Copy Markdown
Member

Summary

What kind of change does this PR introduce?

Did you add tests for your changes?

Does this PR introduce a breaking change?

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Use of AI

@alexander-akait
Copy link
Copy Markdown
Member

@bjohansebas let's make rebase here

Copilot AI review requested due to automatic review settings May 22, 2026 04:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 94.96855% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.85%. Comparing base (fd40130) to head (28ecc85).

Files with missing lines Patch % Lines
lib/Server.js 96.10% 10 Missing ⚠️
bin/webpack-dev-server.js 79.31% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5674      +/-   ##
==========================================
+ Coverage   83.53%   88.85%   +5.31%     
==========================================
  Files          13       13              
  Lines        2077     5893    +3816     
  Branches      768        0     -768     
==========================================
+ Hits         1735     5236    +3501     
- Misses        306      657     +351     
+ Partials       36        0      -36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait
Copy link
Copy Markdown
Member

@bjohansebas can we rebase again? 😄

@bjohansebas
Copy link
Copy Markdown
Member Author

yep, on it!

bjohansebas and others added 23 commits May 23, 2026 11:01
* feat!: drop support for node <20.9

* feat: update baseline-browser-mapping to version 2.9.16

* chore: remove baseline-browser-mapping dependency
* chore: remove SockJSClient and related files from the project

* chore: remove SockJS support and related configurations from the project

* chore: remove SockJS example files and configurations

* chore: remove SockJS support and related tests from the project

* refactor: change sockjs to ws for customclient

* fix: update import typedef

* fix: update snapshots

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>

* chore: remove SockJS and related type definitions from package.json and package-lock.json

* refactor: simplify WebSocket session handling in tests

* test: update WebSocket handling in client tests to use CDP sessions

* fix: update snapshot for SSL certificate generation log in server options test

* docs: update migration guide to reflect removal of SockJS support

* refactor: remove SockJS dependency from CustomWebSocketClient

* chore: update puppeteer to version 24.35.0 in package.json

* fix: update import path for webpack config in client tests

* fix: update createCDPSession usage in client tests

* refactor: update session creation and subscription handling in tests

* fix: update webSocketTransport configuration to include webSocketURL and host

---------

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
* feat: bump to express 5

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>

* fix: update webpack-dev-middleware to version 7.4.5 and adjust snapshot for response headers

* test: remove TODO comment regarding content-type in range-header test

* refactor: simplify logger assignment in proxy

* test: update expectation for error logging in proxy option test

* test: mock console.error for proxy option tests and verify error logging

* refactor: replace logger string with server.logger in allowed hosts tests

* refactor: update proxy middleware to use 'on' object for request handling

* docs: update migration guide to clarify proxy options changes

---------

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
* feat: remove spdy support

* docs: update migration guide to remove spdy server type support
* test: remove async bypass handling from proxy options

the router does not allow sending data the way bypass did. In the router we only have the req object, so this test is removed since it is invalid (https://github.com/chimurai/http-proxy-middleware/blob/6436ffc522a3a2485c198bd2fb544db0e33e3821/src/router.ts#L7)

* test: remove another test

 Just like in the previous commit, the router, or any other handler ,does not allow sending data; it only changes where the request should be forwarded via the proxy. Therefore, it doesn’t make sense to keep this test.

* test: remove deprecated bypass option tests

* test: use only pathRewrite

* feat: remove deprecated bypass option from proxy configuration

* test: improve tests

* test: update pathFilter in proxy option tests

* docs: update migration guide to reflect removal of bypass function in proxy configuration

* chore: update examples

* fixup!

* docs: update migration guide to clarify minimum webpack version requirement
* feat: use compiler.platform to determine the target

* feat: update WebSocket communication conditions and multi-compiler fallback logic

* chore: update qs package to version 6.15.0

* fixup!
* feat: remove deprecated CLI flags for HTTP/2, HTTPS, and web socket server options

* chore: update migration guide to reflect removal of deprecated CLI options

* feat: remove cli-flags

* feat: remove cli-flags.d.ts
* chore: update webpack-dev-middleware

* feat: sync originalUrl in middleware for webpack-dev-middleware compatibility
* chore: bump dependencies

* chore: bump vulnerables dependencies
* chore: update webpack-cli to version 7.0.2

* fixup!
* chore: update chokidar to v4

* chore: only prevent interval be undefined

* feat: support for glob support

* feat: enhance watchFiles option to support ignored patterns with glob strings

* feat: add tests for watchFiles option with ignored glob array support

* fix: windows support
* feat(tests): add node test setup and update test utilities

- Introduced a new script for node test setup (`scripts/node-test-setup.mjs`) to configure snapshot serializers and resolve snapshot paths for webpack tests.
- Added new npm script `test:node` in `package.json` for running node tests with specific configurations.
- Updated Jest snapshots in `proxy-option.test.js.snap.webpack5` to reflect changes in test descriptions.
- Refactored tests in `open-option.test.js` and `proxy-option.test.js` to utilize `jest-mock` for mocking and spying, replacing previous Jest mocking methods.
- Changed `beforeAll` and `afterAll` hooks to `before` and `after` for better test isolation and readability.

* refactor(tests): update snapshot test descriptions and improve test structure

- Changed snapshot test descriptions to include a more structured format.
- Updated snapshot assertions to use `t.assert.snapshot` for consistency.
- Refactored test setup and teardown methods to use `before` and `after` from `node:test`.
- Adjusted the test cases in `normalize-options.test.js` and `validate-options.test.js` for improved clarity and maintainability.

* refactor(tests): update CLI option tests to use node:test and expect

- Refactored multiple test files to utilize the `node:test` module for structuring tests.
- Replaced direct assertions with `t.assert.snapshot` for snapshot testing.
- Ensured consistency across tests by adding async context to test functions.
- Updated imports to include necessary testing utilities from `node:test` and `expect`.

* refactor(tests): update web socket tests to use node:test and expect assertions

- Replaced traditional test structure with node:test for better test organization.
- Updated snapshot assertions to use the new test framework's syntax.
- Ensured all test cases in web-socket-communication.test.js, web-socket-server-url.test.js, and web-socket-server.test.js are consistent with the new structure.

* refactor(tests): migrate tests to use node:test and improve snapshot organization

- Updated test files to utilize the `node:test` module for better compatibility and performance.
- Replaced `jest.fn()` with `jest-mock` functions for mocking in various test cases.
- Enhanced snapshot descriptions for clarity and consistency across tests.
- Introduced a new `jsdom-setup.js` helper to streamline JSDOM configuration for tests.
- Adjusted test cases to use `t.assert.snapshot()` for snapshot assertions.
- Cleaned up mock implementations and reset logic in tests for improved reliability.

* refactor: migrate tests from Jest to Node's test module

- Updated package.json to remove Jest dependencies and adjust test scripts for Node's test module.
- Deleted globalSetupTest.js and setupTest.js as they are no longer needed.
- Refactored ReactErrorBoundary.test.js to utilize real jsdom window/document.
- Updated WebsocketClient.test.js to use async/await and improved test structure.
- Skipped index.test.js due to dependency on Jest's mocking capabilities.
- Refactored socket-helper.test.js to create a mock WebSocketClient class.
- Updated log.test.js to simplify logger tests and remove unnecessary mocks.
- Enhanced jsdom-setup.js to replace jsdom's WebSocket with Node's ws library for better testing of WebSocket connections.

* fixup!

* fixup!

* fixup!

* fixup!

* fixup!

* fixup!

* fixup!

* fixup!

* fixup!

* fixup!

* fixup!

* chore: update test runner

* fixup!

* chore: update snapshots and fix module path in API tests

* fixup!

* fixup!

* chore: update snapshots for watchFiles option tests

* refactor: remove unused Logger interface and simplify socket function parameters

* fix: update snapshot serialization for Windows compatibility and adjust test helper import

* fix: codecov upload

* fix: ensure directories are created for test reporter destination

* refactor: simplify client resolution and clean up socket tests

* refactor: clean up comments and improve clarity in test files

* fixup!
* chore: update chokidar to v5.0.0 in package.json

* chore: update follow-redirects
* fix: treat loopback aliases as equivalent in isSameOrigin

 - When host: localhost is configured, the OS decides at bind time whether localhost resolves to 127.0.0.1 (IPv4) or ::1 (IPv6).
 - This causes isSameOrigin() to reject valid WebSocket connections
because the final string comparison localhost === ::1 fails,
triggering an infinite reconnection loop in the browser console.

* fix: update test to handle IPv6 loopback address in host header simulation

* fix: enhance isSameOrigin to respect explicit allowedHosts excluding loopback aliases

---------

Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
* refactor: migrate to ES module syntax

* refactor: migrate ports-map.js to ES module syntax

* refactor: migrate helper files to ES module syntax

* refactor: migrate fixtures configs to ES module syntax

* refactor: migrate test files to ES module syntax

* refactor: migrate test files to ES module syntax

* refactor: migrate test files to use fileURLToPath for __dirname

* refactor: remove duplicate import of http in cross-origin request tests

* refactor: update library type to module and enable outputModule experiment in webpack config

* refactor: update client transport implementation checks and adjust module federation test assertions

* refactor: enhance client transport handling with pathToFileURL for absolute paths

* fixup!

* fixup!

* refactor: improve lazy loading of webpack peer dependency and update addAdditionalEntries to async

* fixup!

* refactor: update lazy initialization of webpack dev middleware to async

* refactor: update TypeScript configuration to target ES2024 and improve type definitions

* fixup!

* refactor: simplify package installation check using require.resolve

* fix: update Node.js target version in Babel configuration to 22.15.0

* fixup!

* fixup!

* refactor: dynamically import 'node:net' in Server class for improved module loading

* refactor: update type definition for onLoadQueue to ensure correct function signature

* fixup!

* refactor: migrate examples to ES module syntax and remove "use strict" directives

- Updated all example files to use ES module imports instead of CommonJS require.
- Removed unnecessary "use strict" directives from JavaScript files.
- Adjusted webpack configuration files to utilize import.meta for context and URL handling.
- Ensured consistent use of import statements across all examples.

* refactor: update webpack configuration and asset handling for improved module support

* refactor: update webSocketServer configuration to use object syntax for improved clarity

* refactor: update test coverage script to include additional directories for improved coverage reporting
* chore: update http-proxy-middleware

* chore: update migration guide for Node.js version and spdy server support

* chore: replace http-proxy with httpxy in package.json and ipc.test.js

* fixup!

* chore: httpxy@0.5.3

* refactor: update httpxy import to use namespace import and remove IPv6 handling in Server

* chore: update http-proxy-middleware to version 4.0.0
* feat: add changeset validation and release workflow

* chore: add changes

* chore: fix package-lock

* chore: update http-proxy-middleware to v4

* docs: update migration guide with ESM-only and Express v5 changes

* chore: update webpack-dev-middleware to v8 and document breaking changes

* chore: update imports to use node: prefix and replace regex with replaceAll

* chore: update qs to v6.15.2 and ws to v8.21.0 in package-lock.json
Copilot AI review requested due to automatic review settings May 23, 2026 16:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 23, 2026 18:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants